<br />

{include file="my_event/guest.tpl"} {if $myevent}
<!-- If public user is logged, show his/her options. -->
<h2>Manage videos and photos for <a
	href="{$REAL_ROOT}my_event/{$myevent->id}/">{$myevent->name}</a></h2>
<br />

{if $errors}
<fieldset
	style="color: #f00; font-weight: bold; border: 1px solid #f00; padding: 10px;">
<legend style="padding: 0 10px 0 10px;">Error</legend> {foreach
from=$errors item=error} &bull; {$error} <br />
{/foreach}</fieldset>
<br />
{/if}

<table width="100%">
	<tr>
		<th style="font-weight: bold;">Photos</th>
		<th style="font-weight: bold;">Videos</th>
	</tr>
	<tr>
		<td style="vertical-align: top;"><br />
		<form action="{$REAL_ROOT}my_event/add_photo/" method="post"
			enctype="multipart/form-data"><input type="hidden" name="event"
			value="{$myevent->id}" />
		<fieldset style="border: 1px solid #777; padding: 10px;"><legend>Add
		Photo</legend>
		<table>
			<tr>
				<td><span style="color: #f00;">*</span>Name:</td>
				<td><input type="text" name="name" value="{$smarty.post.name}"
					size="30" /></td>
			</tr>
			<tr>
				<td><span style="color: #f00;">*</span>Photo URL:</td>
				<td><input type="text" name="purl" value="{$smarty.post.purl}"
					size="30" /> OR</td>
			</tr>
			<tr>
				<td>Upload:</td>
				<td><input type="file" name="picture" size="20" /></td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" value="Add Photo" /></td>
			</tr>
		</table>
		</fieldset>
		</form>
		</td>
		<td style="vertical-align: top;"><br />
		<form action="{$REAL_ROOT}my_event/add_video/" method="post"><input
			type="hidden" name="event" value="{$myevent->id}" />
		<fieldset style="border: 1px solid #777; padding: 10px;"><legend>Embed
		Video</legend>
		<table>
			<tr>
				<td><span style="color: #f00;">*</span>Video Title:</td>
				<td><input type="text" name="title" value="{$smarty.post.title}"
					size="30" /></td>
			</tr>
			<tr>
				<td><span style="color: #f00;">*</span>Video URL:</td>
				<td><input type="text" name="url" value="{$smarty.post.url}"
					size="30" /></td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" value="Add Video" /></td>
			</tr>
			<tr>
				<td colspan="2">Fields marked with asterisks(<span
					style="color: #f00;">*</span>) are required.</td>
			</tr>
		</table>
		</fieldset>
		</form>
		</td>
	</tr>
	<tr>
		<td style="vertical-align: top;"><!-- photos --> {if $myevent->photos}
		<table width="100%">
			{foreach from=$myevent->photos item=photo}
			<tr>
				<td style="border-bottom: 1px dashed #ccc;"><img src="{$photo->url}"
					width="100" height="80" /></td>
				<td style="border-bottom: 1px dashed #ccc;">{$photo->name}</td>
				<td style="border-bottom: 1px dashed #ccc;"><a title="Delete"
					href="{$REAL_ROOT}my_event/delete_photo/{$myevent->id}/{$photo->id}/"
					class="delete" rel="photo"> <img src="{$WEB_ROOT}images/delete.png"
					alt="Delete" /> </a></td>
			</tr>
			{/foreach}
		</table>
		{/if}</td>
		<td style="vertical-align: top;"><!-- videos --> {if $myevent->videos}
		<table width="100%">
			{foreach from=$myevent->videos item=video}
			<tr>
				<td style="border-bottom: 1px dashed #ccc;">
				<div
					style="width: 120px; height: 80px; overflow: hidden; position: relative;">
				<embed id="video-vd" height="97" width="120"
					flashvars="file={$video->url}&overstretch=fit" wmode="opaque"
					allowscriptaccess="always" allowfullscreen="true" quality="high"
					src="{$WEB_ROOT}swf/mediaplayer-viral/player1.swf"
					type="application/x-shockwave-flash" /></div>
				</td>
				<td style="border-bottom: 1px dashed #ccc;">{$video->title}</td>
				<td style="border-bottom: 1px dashed #ccc;"><a title="Delete"
					href="{$REAL_ROOT}my_event/delete_video/{$myevent->id}/{$video->id}/"
					class="delete" rel="video"> <img src="{$WEB_ROOT}images/delete.png"
					alt="Delete" /> </a></td>
			</tr>
			{/foreach}
		</table>
		{/if}</td>
	</tr>
</table>
{/if}
